package com.cskaoyan.utils;

import com.cskaoyan.model.vx.vo.WxOrderDetailVo;
import com.cskaoyan.model.vx.vo.WxOrderListVo;

/**
 * @author jiaolei
 */ //WxOrderDetailVo.OrderInfoBean
public class TextAndHandOnWxOrderDetailVoUtil {
    public static String to(WxOrderDetailVo.OrderInfoBean orderInfoBean){
        Short status=orderInfoBean.getOrderStatus();
        WxOrderDetailVo.OrderInfoBean.HandleOptionBean handleOption = new WxOrderDetailVo.OrderInfoBean.HandleOptionBean();
        orderInfoBean.setHandleOption(handleOption);

        Short deleted = orderInfoBean.getDeleted();

        if(deleted==1){
            handleOption.setDelete(true);
            return "已取消（系统）";
        }
        if(status==101){
            handleOption.setCancel(true);
            handleOption.setPay(true);
            return "未付款";
        }else if(status==201){
            handleOption.setRefund(true);
            return "已付款";
        }else if(status==301){
            handleOption.setConfirm(true);
            return "已发货";
        }else if(status==401){
            handleOption.setAftersale(true);
            handleOption.setComment(true);
            handleOption.setDelete(true);
            handleOption.setRebuy(true);
            return "已收货";
        }else if(status==103){
            handleOption.setDelete(true);
            return "已取消";
        }else if(status==202){
            return "订单取消,退款中";
        }
        return "未找到字段";
    }
}
